[FIRRTL] Add layer block support to AddSeqMemPorts #7599
+129
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update the AddSeqMemPorts pass to support layers. Namely, this will now allow for input ports to be added to memories declared under layer block. If a user tries to add output ports, then produce an error.
Generally, this entire pass likely doesn't make sense for layer blocks at all. I.e., this pass is entirely about adding MBIST ports to memories. Memories that are declared under layerblocks are likely only for verification use and adding MBIST ports to these doesn't really make sense. Nonetheless, it is reasonable to have this pass do something sane if it encounters a user request like this.
This made a small change to the pass output where the connects created are placed immediately following the memory instance. This is necessary to create the connects inside the layer blocks. However, it is also slightly better output than before. (This changed one test superficially.)